<div class="row">
    <div class="col-md-12">
        <div class="box">
            <div class="box-body">
                <form class="form-inline" name="searchForm" id="searchForm" action="" method="GET">
                    <div class="form-group">
                        <input value="{$keywords ? $keywords : '' ;}"
                               name="keywords" id="keywords" class="form-control input-sm" placeholder="订单号/车主/乘客">
                    </div>

                    <div class="form-group">
                        <select name="_order_" class="form-control input-sm">
                            <option value="">排序字段</option>
                            <option value="" {if isset($_order_) && $_order_=='id'}selected{/if}>ID</option>
                            <option value="name" {if isset($_order_) && $_order_=='name'}selected{/if}>帐号</option>
                            <option value="reg_time" {if isset($_order_) && $_order_=='reg_time'}selected{/if}>注册时间</option>
                            <option value="last_login_time" {if isset($_order_) && $_order_=='last_login_time'}selected{/if}>最后登录时间</option>
                        </select>
                    </div>

                    <div class="form-group">
                        <select name="_by_" class="form-control input-sm">
                            <option value="">排序方式</option>
                            <option value="desc" {if isset($_by_) && $_by_=='desc'}selected{/if}>倒序</option>
                            <option value="asc"  {if isset($_by_) && $_by_=='asc'}selected{/if}>正序</option>
                        </select>
                    </div>

                    <div class="form-group">
                        <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
                        </button>
                    </div>
                    <div class="form-group">
                        <button onclick="exportData()" class="btn btn-sm btn-default" type="button"><i
                                class="fa fa-download"></i> 导出
                        </button>
                    </div>

                    <div class="form-group">
                        <button onclick="clear_form()" class="btn btn-sm btn-" type="button"><i
                                class="fa  fa-eraser"></i> 清空查询
                        </button>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <div class="box">
            {include file="template/data_header" /}
            <div class="box-body table-responsive">
                <table class="table table-hover table-bordered datatable" width="100%">
                    <thead>
                    <tr>
                        <th>
                            <input id="data-checkall" type="checkbox" onclick="check_all(this)" class="checkbox" placeholder="全选/取消">
                        </th>
                        <th>ID</th>
                        <th>订单编号</th>
                        <th>司机</th>
                        <th>车牌号</th>
                        <th>乘客</th>
                        <th>起始位置</th>
                        <th>目的地</th>
                        <th>订单金额</th>
                        <th>里程数</th>
                        <th>创建时间</th>
                        <th>结束时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="list" item="item"}
                    <tr>
                        <td>
                            <input type="checkbox" onclick="check_this(this)" name="data-checkbox"
                                   data-id="{$item.id}" class="checkbox data-list-check" value="{$item.id}"
                                   placeholder="选择/取消">
                        </td>
                        <td>{$item.id}</td>
                        <td>{$item.num}</td>
                        <td>{$item.driver.nickname}</td>
                        <td>{$item.car.car_number}</td>
                        <td>{$item.users.name}</td>
                        <td>{$item.start_place}</td>
                        <td>{$item.end_place}</td>
                        <td>{$item.order_money}</td>
                        <td>{$item.mile}</td>
                        <td>{$item.create_time}</td>
                        <td>{$item.end_time}</td>
                        <td>
                            <a class="label label-{if $item.status==1}success{else/}danger{/if} AjaxButton" data-toggle="tooltip" title="{if $item.status==1}点击禁用{else/}点击启用{/if}" data-id="{$item.id}" data-confirm="1" data-url="disable.html">{$item.admin_status_text}</a>
                        </td>
                        <td class="td-do">
                            <a href="edit.html?id={$item.id}"
                               class="btn btn-primary btn-xs" data-toggle="tooltip" title="修改">
                                <i class="fa fa-pencil"></i>
                            </a>
                            <a class="btn btn-danger btn-xs AjaxButton" data-toggle="tooltip" title="删除" data-confirm-title="删除提示" data-confirm-content="您确认要删除ID为{$item.id}的用户吗？" data-id="{$item.id}" data-url="del.html">
                                <i class="fa fa-trash"></i>
                            </a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
            {include file="template/data_footer" /}
        </div>